#!/usr/bin/env bash

set -euo pipefail

find . -type f \( -iname '*.tif' -o -iname '*.tiff' \) | \
while read -r tiffname
do
    convert "$tiffname" "$(echo "$tiffname" | sed -E 's/\.tiff?$/.png/')"
done
